import api from '../index'

// 列表查询参数
interface SysPlaInfConfQuery {
  information?: string
  informationValue?: string
  informationEn?: string
  informationDescription?: string
  sort?: string
  order?: string
  page: number
  size: number
  from: number
  limit: number
}

// 实体类型
interface SysPlaInfConf {
  id: number
  information: string
  informationValue: string
  informationEn: string
  informationDescription: string
}

export default {
  // 获取平台信息配置列表（分页）
  list: (params: SysPlaInfConfQuery) => api.get('/system/plaInfConf/list', { params }),

  // 新增平台信息配置
  add: (data: SysPlaInfConf) => api.post('/system/plaInfConf/add', data),

  // 编辑平台信息配置
  edit: (data: SysPlaInfConf) => api.post('/system/plaInfConf/update', data),

  // 删除平台信息配置
  delete: (id: number) => api.delete(`/system/plaInfConf/delete/${id}`),

  // 获取详情
  detail: (id: number) => api.get(`/system/plaInfConf/detail/${id}`),

  create: (data: SysPlaInfConf) => api.post('/system/plaInfConf/add', data),

}
